package com.mrtan.mapper;

import com.mrtan.bean.OrderProcure;
import com.mrtan.bean.OrderSell;
import com.mrtan.dto.HomeDto;
import com.mrtan.dto.Info;
import com.mrtan.dto.YearDto;
import com.mrtan.vo.OrderProcureVO;
import com.mrtan.vo.OrderShowWhereVO;
import com.mrtan.vo.PurchaseOrderVO;
import com.mrtan.dto.YearsDto;
import com.mrtan.vo.*;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Mr.Tan
 * @description 针对表【order(订单)】的数据库操作Mapper
 * @createDate 2023-12-06 14:31:39
 * @Entity com.mrtan.bean.Order
 */
public interface OrderMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(OrderSell record);

    int insertSelective(OrderSell record);

    OrderSell selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OrderSell record);

    int updateByPrimaryKey(OrderSell record);

    List<OrderSell> selectAll(OrderShowWhereVO orderShowWhereVO);

    List<OrderSell> selectList();

    List<OrderSell> selectAllSell(OrderShowWhereVO orderShowWhereVO);
    List<OrderSell> selectAllSellw();
    List<OrderSell> selectAllSelly();


    OrderSell selectByOrderCode(@Param("orderCode") String orderCode);


    List<OrderProcure> selectAllProcure(OrderProcureVO orderProcureVO);

    void insertPurchase(PurchaseOrderVO purchaseOrderVO);
    int updateStatusbyOrderId(@Param("order") Integer order);

    Info findOrderInfo(@Param("type")int type);
    List<YearDto> findhome(@Param("year")String year ,@Param("type")int type);

    BigDecimal selectAllPrice();

    int selectAllOrderCount();

    List<YearsDto> selectCountAndPrice(@Param("year") String year);
    int updateStatus(OrderVO orderVO);
    int updateSell(@Param("ordercode") String ordercode,@Param("who_id") Integer who_id);

    int insertOrderSell(OrderInsertVO orderInsertVO);

}
